package com.hh.usercenter.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantWxValue implements InitializingBean {

    @Value("${wx.open.app_id}")
    private String app_id;

    @Value("${wx.open.app_secret}")
    private String app_secret;

    @Value("${wx.open.redirect_url}")
    private String redirectUrl;

    public static String APP_ID;
    public static String APP_SECRET;
    public static String REDURECT_URL;

    @Override
    public void afterPropertiesSet() throws Exception {
        APP_ID = this.app_id;
        APP_SECRET = this.app_secret;
        REDURECT_URL = this.redirectUrl;
    }
}
